{% extends "general_layout.html" %}
{% block content %}
    <div class="content-section">
        <form method="POST" action="">
            {{ form.hidden_tag() }}
            <fieldset class="form-group">
                <legend class="border-bottom mk-4">忘记密码了？没关系，记得邮箱就能找回～</legend>
                                
                <div class="form-group">
                    {{ form.password.label(class="form-control-label")}}
                    {% if form.password.errors %}
                    {{ form.password(class ="form-control form-control-lg is-invalid" )}}
                    <div class="invalid-feedback">
                        {% for error in form.password.errors %}
                            <span> {{ error }}</span>
                        {% endfor %}
                    </div>
                {% else %}
                    {{ form.password(class="form-control form-control-lg")}}
                {% endif %} 
                </div>

                <div class="form-group">
                    {{ form.confirm_password.label(class="form-control-label")}}
                    {% if form.confirm_password.errors %}
                    {{ form.confirm_password(class ="form-control form-control-lg is-invalid" )}}
                    <div class="invalid-feedback">
                        {% for error in form.confirm_password.errors %}
                            <span> {{ error }}</span>
                        {% endfor %}
                    </div>
                {% else %}
                    {{ form.confirm_password(class="form-control form-control-lg")}}
                {% endif %} 
                </div>
            </fieldset>
            <div class = "form-group">
                {{form.submit(class = "btn btn-outline-info")}}
            </div>
        </form>
    </div>

    <div class= "border-top pt-3">
        <small class= "text-muted">
            还没注册乐学偶得账户？<a class="ml-2" href="{{ url_for('users.register') }}">点我注册，加入乐学偶得，10万小伙伴等你一起来玩~</a>
        </small>
    </div>
{% endblock content %}